//求序列之和——递归
#include <stdio.h>

double Sequence( int n );

int main()
{
	int n;
	double result;
	scanf("%d",&n);
	if ( n==1 )
	{
		printf("%d\n",n);
	}
	else
	{
		result = Sequence(n);
		printf("%.6lf\n",result);
	}
	return 0;
}

double Sequence( int n )
{
	double sum;
	if ( n==1 )
	{
		return 1;
	}
	else if ( n%2 == 0 )
	{
		return 1.0*1/n + Sequence( n-1 ); 
	}
	else if ( n%2 != 0 && n>1 )
	{
		return - 1.0*1/n + Sequence( n-1 );
	}
}